<?php

declare(strict_types=1);

/**
 * @Author:     Frank
 * @contact     frank_hhm@163.com
 * @Date:       2022-11-15 16:21:27
 * @Last Modified time: 2023-01-09 17:50:40
 */
namespace app\common\enum\system\config;

use frank\base\BaseEnum;

/**
 * 枚举类
 * Class TypeEnum
 * @package app\common\enum\system\config
 */
class TypeEnum extends BaseEnum
{
    const SYSTEM = 'system';

    const TEXT = 'text';

    const TEXTARER = 'textarea';

    const RADIO = 'radio';

    const CHECKBOX = 'checkbox';

    const SELECT = 'select';

    const UPLOAD = 'upload';

    /**
     * 获取枚举数据
     * @return array
     */
    public static function data()
    {
        return [
            self::SYSTEM => [
                'name' => '默认',
                'value' => self::SYSTEM,
            ],
            self::TEXT => [
                'name' => '文本',
                'value' => self::TEXT,
            ],
            self::TEXTARER => [
                'name' => '多行文本框',
                'value' => self::TEXTARER,
            ],
            self::RADIO => [
                'name' => '单选框',
                'value' => self::RADIO,
            ],
            self::CHECKBOX => [
                'name' => '多选框',
                'value' => self::CHECKBOX,
            ],
            self::SELECT => [
                'name' => '下拉框',
                'value' => self::SELECT,
            ],
            self::UPLOAD => [
                'name' => '文件上传',
                'value' => self::UPLOAD,
            ],
        ];
    }
}